<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <!-- INTERFACE -->
    <cc:interface>
        <cc:attribute name="bill" />
        <cc:attribute name="dup" />
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
        <h:form>


            <h:outputStylesheet library="css" name="printing.css"></h:outputStylesheet>
            <div  >
                <h:panelGroup id="gpBillPreview" >

                    <div class="fiveinchbillBreakRuhunu" >

                        <div style="position: absolute!important;left: 40%!important; font-weight: bold!important;
                             top: 0%!important;font-size: 16px!important; text-decoration: underline!important;">
                            <h:outputLabel value="Inward Payment"   />                           
                        </div>

                        <div style="position: absolute;
                             left: 0%!important;
                             top: 7%!important;
                             font-size: 12px!important;">
                            <h:outputLabel value="Receipt No"/>
                        </div>
                        <div style="position: absolute;
                             left: 23%;
                             top: 7%;
                             font-size:12px!important;">
                            <h:outputLabel value=":"/>
                        </div>
                        <div style="position: absolute;
                             left: 25%!important;
                             top: 7%!important;
                             font-size: 12px!important;">
                            <!--                        <h:outputLabel value="Bill No"/><h:outputLabel value=":"/>-->
                            <h:outputLabel value="#{cc.attrs.bill.insId}" rendered="#{cc.attrs.bill.cancelled eq false}"/>
                            <h:outputLabel value="#{cc.attrs.bill.cancelledBill.insId}" rendered="#{cc.attrs.bill.cancelled eq true}"/>
                        </div>

                        <div style="position: absolute;
                             left: 73%!important;
                             top: 7%!important;
                             font-size: 12px!important;">
                            <h:outputLabel value="Date"/>
                        </div>
                        <div style="position: absolute;
                             left: 82%;
                             top: 7%;
                             font-size:12px!important;">
                            <h:outputLabel value=":"/>
                        </div>
                        <div style="position: absolute;
                             left: 84%!important;
                             top: 7%!important;
                             font-size: 12px!important;" >
                            <h:outputLabel value="#{cc.attrs.bill.billDate}" rendered="#{cc.attrs.bill.cancelled eq false}">
                                <f:convertDateTime pattern="dd/MM/yy"/>
                            </h:outputLabel>
                            <h:outputLabel value="#{cc.attrs.bill.cancelledBill.billDate}" rendered="#{cc.attrs.bill.cancelled eq true}">
                                <f:convertDateTime pattern="dd/MM/yy"/>
                            </h:outputLabel>
                        </div>

                        <div style="position: absolute;
                             left: 0%!important;
                             top: 11%!important;
                             font-size: 12px!important;">
                            <h:outputLabel value="Payment Type"/>
                        </div>
                        <div style="position: absolute;
                             left: 23%;
                             top: 11%;
                             font-size:12px!important;">
                            <h:outputLabel value=":"/>
                        </div>
                        <div style="position: absolute;
                             left: 25%;
                             top: 11%;
                             font-size:12px!important;" >
                            <h:outputLabel value="#{cc.attrs.bill.paymentMethod}" >
                            </h:outputLabel>
                        </div>

                        <div style="position: absolute;
                             left: 73%!important;
                             top: 11%!important;
                             font-size: 12px!important;">
                            <h:outputLabel value="Time"/>
                        </div>
                        <div style="position: absolute;
                             left: 82%;
                             top: 11%;
                             font-size:12px!important;">
                            <h:outputLabel value=":"/>
                        </div>
                        <div style="position: absolute;
                             left: 84%;
                             top: 11%;
                             font-size:12px!important;" >
                            <h:outputLabel value="#{cc.attrs.bill.billTime}" rendered="#{cc.attrs.bill.cancelled eq false}">
                                <f:convertDateTime pattern="hh:mm a"/>
                            </h:outputLabel>
                            <h:outputLabel value="#{cc.attrs.bill.cancelledBill.billTime}" rendered="#{cc.attrs.bill.cancelled eq true}">
                                <f:convertDateTime pattern="hh:mm a"/>
                            </h:outputLabel>
                        </div>
                        
                        <div style="position: absolute;
                             left: 50%;
                             top: 17%;
                             font-size:12px!important;
                             font-weight: bold!important;">
                            <h:outputLabel value="**Duplicate**" rendered="#{cc.attrs.dup eq true}" />
                            <h:outputLabel value="**Cancelled**" rendered="#{cc.attrs.bill.cancelled eq true}"/>
                        </div>
                        
                        <div style="position: absolute;
                         left: 0%!important;
                         top: 25%!important;
                         font-size: 13px!important;">
                            <h:outputLabel value="Patient Name"/>
                        </div>
                        <div style="position: absolute;
                         left: 26%;
                         top: 25%;
                         font-size:13px!important;">
                            <h:outputLabel value=":"/>
                        </div>
                        <div style="position: absolute;
                         left: 28%;
                         top: 25%;
                         font-weight: bold;
                         font-size:13px!important;
                         text-transform: capitalize!important;" >
                            <h:outputLabel value="#{cc.attrs.bill.patient.person.nameWithTitle}"  />
                        </div>

                        <div style="position: absolute;
                         left: 0%!important;
                         top: 29%!important;
                         font-size: 13px!important;">
                            <h:outputLabel value="BHT No"/>
                        </div>
                        <div style="position: absolute;
                         left: 26%;
                         top: 29%;
                         font-size:13px!important;">
                            <h:outputLabel value=":"/>
                        </div>
                        <div style="position: absolute;
                         left: 28%;
                         top: 29%;
                         font-weight: bold;
                         font-size:13px!important;" >
                            <h:outputLabel value="#{cc.attrs.bill.patientEncounter.bhtNo}" style=""/>
                        </div>






                        <div style="position: absolute;left: 20%;top: 50%;min-width: 85%; margin-top: 60px!important;" >

                            <table style="min-width:100%;">
                                <tr>
                                    <td style="text-align: left; min-width: 3cm; font-weight: bold;">
                                        <h:outputLabel value="Cash Amount :&nbsp;&nbsp;" style="text-align: right!important;  font-size: 15px!important;"/>


                                        <h:outputLabel value="Rs. " style="font-size: 15px!important;"/>
                                        <h:outputLabel value="#{cc.attrs.bill.netTotal}" style="font-size: 15px!important;">
                                            <f:convertNumber pattern="#,###,##0.00" />
                                        </h:outputLabel>
                                        <h:outputLabel value=" /=" style="font-size: 18px!important;"/>
                                    </td>

                                </tr>
                            </table>
                            <br/>
                            <br/>
                            <br/>

                        </div>
                        <div>
                            <table>
                                <tr>
                                    <td>
                                        <div class="cashierPrinting" style="text-decoration: overline;font-size: 12px;">
                                            <h:outputLabel  value="Cashier : #{cc.attrs.bill.creater.code}"   />
                                        </div>

                                    </td>
                                    <td>
<!--                                        <div class="pgsignPrinting" style="text-decoration: overline; margin-left: 70%; font-size: 12px;">
                                            <h:outputLabel  value="Patient/Guardian"   />
                                        </div>-->
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>

                </h:panelGroup>
            </div>


        </h:form>
    </cc:implementation>
</html>
